#include <iostream>
using namespace std;
// double (* pf)(int);  pf points to a function that returns double
// double *pf(int);  pf() a function that return a pointer-to-double
double betsy(int);
double pam(int);
void estimate(int lines, double (*pf)(int) );
/*int main ()
{
  int code;
  cout << "How many lines of code do you need? ";
  cin >> code;
  cout << "Here‘s Betsy ‘s estimate:\n";
  estimate(code,betsy);
  cout << "Here's Pam's estimate:\n " ;
  estimate(code,pam);
  return 0;
}*/
double betsy(int lns)
{
   return 0/05 * lns;
}
double pam(int lns)
{
   return 0.03 * lns +0.0004 * lns * lns;
}
void estimate(int lines, double (*pf)(int) )
{
   cout << lines << " lines will take ";
   cout << (*pf)(lines) << " hours(s)\n";
}